import { BrowserModule } from "@angular/platform-browser";
import { NgModule } from "@angular/core";
import { HttpClientModule } from "@angular/common/http";
import { FormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";
import { FileUploadModule } from "ng2-file-upload";
import { AppRoutingModule } from "./app-routing.module";

import { AppComponent } from "./app.component";
import { MonacoEditorModule } from "ngx-monaco-editor";
import { NgxEditorComponent } from "./ngx-editor/ngx-editor.component";
import { MonacoConfig } from "./ngx-editor/monaco-config";
import { TopbarComponent } from "./topbar/topbar.component";
import { ServiceWorkerModule } from "@angular/service-worker";
import { environment } from "../environments/environment";
import { MainbarComponent } from './mainbar/mainbar.component';
import { ErrorbarComponent } from './errorbar/errorbar.component';
@NgModule({
  declarations: [
    AppComponent,
    TopbarComponent,
    NgxEditorComponent,
    MainbarComponent,
    ErrorbarComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    FormsModule,
    CommonModule,
    FileUploadModule,
    AppRoutingModule,
    MonacoEditorModule.forRoot(MonacoConfig),
    ServiceWorkerModule.register("ngsw-worker.js", {
      enabled: environment.production
    }) // use forRoot() in main app module only.
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}
